package com.travelzen._21.concurrent;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class CachedThreadPool {
	public static void main(String[] args) {
		ExecutorService exec = Executors.newCachedThreadPool();
		ExecutorService ex = Executors.newSingleThreadExecutor();
		for(int i =0; i < 5; i++)
			ex.execute(new LiftOff());
		exec.shutdown();
		ex.shutdown();
	}
}
